package com.liujg.future.mapper;

import com.liujg.future.model.entity.Order;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

public interface OrderRepository extends MongoRepository<Order, String> {

    Page<Order> findByUserIdAndOrderState(String userId, Integer orderState, Pageable pageable);

    Page<Order> findByUserId(String userId, Pageable pageable);

}
